package com.jeesite.modules.ch.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;

import javax.validation.constraints.Size;
import java.util.Date;

/**
 * 渠道流水Entity
 * @author 李寒冰
 * @version 2025-10-11
 */
@Table(name="ch_liushui", alias="a", label="渠道流水信息", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="jine", attrName="jine", label="金额", isUpdateForce=true),
		@Column(name="create_time", attrName="createTime", label="时间", isUpdateForce=true),
		@Column(name="type", attrName="type", label="类型"),
		@Column(name="work_id", attrName="workId", label="详情ID"),
		@Column(name="channel_id", attrName="channelId", label="渠道ID"),
	}, orderBy="a.id DESC"
)
public class ChLiushui extends DataEntity<ChLiushui> {
	
	private static final long serialVersionUID = 1L;
	private Double jine;		// 金额
	private Date createTime;		// 时间
	private String type;		// 类型
	private String workId;		// 详情ID
	private String channelId;

	public String getChannelId() {
		return channelId;
	}

	public void setChannelId(String channelId) {
		this.channelId = channelId;
	}

	public ChLiushui() {
		this(null);
	}
	
	public ChLiushui(String id){
		super(id);
	}
	
	public Double getJine() {
		return jine;
	}

	public void setJine(Double jine) {
		this.jine = jine;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@Size(min=0, max=2, message="类型长度不能超过 2 个字符")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@Size(min=0, max=50, message="详情ID长度不能超过 50 个字符")
	public String getWorkId() {
		return workId;
	}

	public void setWorkId(String workId) {
		this.workId = workId;
	}
	
}